using System;
using System.Web.UI.WebControls;
using SubSonic;
using System.Data;

namespace Impact.Web.Admin
{
    public partial class Query : System.Web.UI.Page
    {

        /// <summary>
        /// Event handler executed when the user clicks Submit
        /// </summary>
        protected void OnSubmit( object sender, CommandEventArgs e )
        {

            QueryCommand qc = new QueryCommand( query.Text, Databases.ImpactProvider );
            DataSet output = DataService.GetDataSet( qc );

            results.DataSource = output;
            results.DataBind();

        }

    }
}
